home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / MoofWars / MoofEncoder / Color Search Procs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.8 KB  |  54 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        Color Search Procs.h
  3.  
  4.     Contains:    This file defines a number of commonly used color search procs.  For the encoder,
  5.                 we only use one of the procs, which returns white if the color of a pixel is within
  6.                 a certain delta of a key color, and returns black for all other cases.  We can use
  7.                 this to quickly create masks of an image.
  8.        
  9.  
  10.     Written by: Timothy Carroll    
  11.  
  12.     Copyright:    Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
  13.  
  14.                 You may incorporate this Apple sample source code into your program(s) without
  15.                 restriction. This Apple sample source code has been provided "AS IS" and the
  16.                 responsibility for its operation is yours. You are not permitted to redistribute
  17.                 this Apple sample source code as "Apple sample source code" after having made
  18.                 changes. If you're going to re-distribute the source, we require that you make
  19.                 it clear in the source that the code was descended from Apple sample source
  20.                 code, but that you've made changes.
  21.  
  22.     Change History (most recent first):
  23.                 7/1/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  24.                 2/24/97        Timothy Carroll    Now explicitly include Main.h
  25.                 8/15/96        Timothy Carroll    Initial Release
  26.     
  27.                 
  28.  
  29. */
  30.  
  31. #ifndef _COLORSEARCHPROC_
  32. #define _COLORSEARCHPROC_
  33.  
  34. #pragma once
  35.  
  36. #include "Main.h"
  37. #include <QuickDraw.h>
  38. // We included main to get our black and white color constants.  If you don't have main.h,
  39. // uncomment these two lines and remove the include.
  40.  
  41. //const RGBColor kWhite = {0xFFFF, 0xFFFF, 0xFFFF};
  42. //const RGBColor kBlack = {0x0000, 0x0000, 0x0000};
  43.  
  44. extern ColorSearchUPP MaskSearchProcUPP;
  45. extern ColorSearchUPP LightenSearchProcUPP;
  46. extern ColorSearchUPP DarkenSearchProcUPP;
  47.  
  48. extern RGBColor gMaskColor;
  49. extern SInt32    gSearchDelta;
  50.  
  51.  
  52. #endif // _COLORSEARCHPROC_
  53.  
  54.